/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.bis.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.bis.entity.BisUser;
import com.jeesite.modules.bis.dao.BisUserDao;

/**
 * bis_userService
 * @author Zhangning
 * @version 2019-08-22
 */
@Service
@Transactional(readOnly=true)
public class BisUserService extends CrudService<BisUserDao, BisUser> {
	
	/**
	 * 获取单条数据
	 * @param bisUser
	 * @return
	 */
	@Override
	public BisUser get(BisUser bisUser) {
		return super.get(bisUser);
	}
	
	/**
	 * 查询分页数据
	 * @param bisUser 查询条件
	 * @param bisUser.page 分页对象
	 * @return
	 */
	@Override
	public Page<BisUser> findPage(BisUser bisUser) {
		return super.findPage(bisUser);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param bisUser
	 */
	@Override
	@Transactional(readOnly=false)
	public void save(BisUser bisUser) {
		super.save(bisUser);
	}
	
	/**
	 * 更新状态
	 * @param bisUser
	 */
	@Override
	@Transactional(readOnly=false)
	public void updateStatus(BisUser bisUser) {
		super.updateStatus(bisUser);
	}
	
	/**
	 * 删除数据
	 * @param bisUser
	 */
	@Override
	@Transactional(readOnly=false)
	public void delete(BisUser bisUser) {
		super.delete(bisUser);
	}

	public BisUser getByOpenId(BisUser param) {
		return dao.getByOpenId(param);
	}

	public BisUser getBySessionKey(String sessionKey) {
		BisUser bisUser = new BisUser();
		bisUser.setSessionId(sessionKey);
		return dao.getBySessionKey(bisUser);
	}
}